<meta charset="utf-8">
<div class="modal fade" id="reg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">用户注册信息</h4>
</div>
<div class="modal-body">
<form name="fm" method="post" enctype="multipart/form-data" action="doUserReg.php" onsubmit="return check()" class="form-horizontal">
<?php
// show.php 页面传来的登录链接，需要带着 vid 参数，以便登陆成功后直接返回视频内容页
?>
<input type="hidden" name="vid" id="videoid" >
<div class="form-group">
  <label  class="col-md-4 control-label">姓名</label>
  <div class="col-md-4"><input type="text" name="username" class="form-control" placeholder="姓名" required></div>
</div>
<div class="form-group">
  <label  class="col-md-4 control-label">密码</label>
  <div class="col-md-4"><input type="password" name="password" class="form-control" placeholder="密码" required></div>
</div>
<div class="form-group">
  <label  class="col-md-4 control-label">性别</label>
  <div class="col-md-4">
  <label class="radio-inline">
  <input type="radio" name="sex" value=0 checked>男</label>
  <label class="radio-inline">
  <input type="radio" name="sex" value=1>女
  </label>
  </div>
</div>
<div class="form-group">
  <label  class="col-md-4 control-label">爱好</label>
  <div class="col-md-4">
  <label class="checkbox-inline">
  <input type="checkbox" name="hobby[]" value="旅游">旅游</label>
 <label class="checkbox-inline">
  <input type="checkbox" name="hobby[]" value="登山">登山</label>
   <label class="checkbox-inline">
  <input type="checkbox" name="hobby[]" value="健身">健身</label>
   <label class="checkbox-inline">
  <input type="checkbox" name="hobby[]" value="上网">上网</label>
   <label class="checkbox-inline">
  <input type="checkbox" name="hobby[]" value="游泳">游泳</label>
  </div>
</div>

  <div class="form-group">
  <label  class="col-md-4 control-label">学历</label>
  <div class="col-md-4">
  <select class="form-control" name="degree" >
  <option value="">请选择</option>
  <option value="0">高中</option>
  <option value="1">大学</option>
  <option value="2">研究生</option>
  <option value="3">博士生</option>
  </select>
  </div>
</div>
<div class="form-group">
  <label  class="col-md-4 control-label">自我介绍</label>
  <div class="col-md-4">
  <textarea type="password" name="intro" rows="3" class="form-control" placeholder="自我介绍" ></textarea>
  </div>
  </div>
  <div class="form-group">
                <label for="exampleInputFile" class="col-md-3 col-sm-offset-1 control-label">头像：</label>
                <div class="col-md-6" >
                  <input type="file" name="pic" id="exampleInputFile" required></div>
              </div>
  <div class="form-group">
  <div class="col-sm-offset-4 col-sm-10">
  <input type="submit" class="btn btn-default" value="提交" >
  <input type="reset" class="btn btn-default" value="重置" >
  </div>
  </div>
  <?php
     if(isset($_GET["msg1"]))
     {
     echo'<h1 style="color:red;">'.$_GET["msg1"]."</h1>";
     }
  ?>
   <?php
     if(isset($_GET["msg2"]))
     {
     echo'<h1 style="color:red;">'.$_GET["msg2"]."</h1>";
     }
  ?>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="location.replace('index.php')" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>